package com.wn.mapper;

import com.wn.common.pojo.City;
import com.wn.common.pojo.ResCity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CityMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(City record);

    int insertSelective(City record);

    City selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(City record);

    int updateByPrimaryKey(City record);
    //根据城市的名称查询城市信息
    City selectByRegionName(String RegionName);
    //根据简单的名称查找
    City selectBySimpleName(@Param("simpleName") String simpleName);
    //获得所有城市
    List<City> getAllCity();
    //获取所有省份
    List<ResCity> getAllProvince(int level);
    //根据级别和省份查到对应省份的城市
    List<ResCity> getAllCityByParentCode(@Param("level") int levle,@Param("parentCode") int parentCode);


    List<City> getCityByName(String simplename);
    //级联搜索查询目的地
    List<ResCity> getDestinationByParentId(@Param("parentId") Integer parentId);
    //根据城市编码查询城市对象
    City selectByRegionCode(@Param("RegionCode") Integer cityRegionCode);
//    List<ResCity> getAllCityByCityCode(@Param("level") int levle,@Param("cityCode") int cityCode);//根据级别和城市查到对应城市的区级

}
